<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <table border="1">
        <tr>
            <td>照片：</td>
            <td><img :src="p.imgUrl"></td>
        </tr>
        <tr>
            <td>名字：</td>
            <td>{{p.name}}</td>
        </tr>
        <tr>
            <td>年龄：</td>
            <td>{{p.age}}</td>
        </tr>
        <tr>
            <td>好友：</td>
            <td>
                <ul>
                    <li v-for="friend in p.friends">{{friend}}</li>
                </ul>
            </td>
        </tr>
    </table>
    <input type="button" @click="f()">
</div>
</body>
<script src="js/vue.min.js"></script>
<script>
    let v = new Vue({
        el: "body>div",
        data: {
            p: {}
        },
        methods: {
            f() {
                v.p = {imgUrl: "man.jpg", name: "传奇哥", age: 25, friends: ["貂蝉", "马云禄", "武则天"]}
            }
        }
    });
</script>
</html>